//
//  TNCityTableHeaderView.m
//  TravelNotes
//
//  Created by 黄锋 on 15/8/12.
//  Copyright (c) 2015年 王浩宇. All rights reserved.
//

#import "TNCityTableHeaderView.h"
#import "Macro.h"

@implementation TNCityTableHeaderView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        _countryLable = [[UILabel alloc] initWithFrame:CGRectMake(10, 20, 150, 40)];
        _countryLable.font = [UIFont systemFontOfSize:20];
        [self.contentView addSubview:_countryLable];
        _pic = [[UIImageView alloc] initWithFrame:CGRectMake(SCREEN_WIDTH - 40, 20, 20, 20)];
        _pic.image = [UIImage imageNamed:@"youjiantou"];
        [self.contentView addSubview:_pic];
        
        UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap)];
        [self addGestureRecognizer:tap];
    }
    return self;
}

- (void)tap
{
    if (_myblock) {
        _myblock();
    }
}

@end
